package com.tablepet.adapter;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

import androidx.annotation.NonNull;

import com.tablepet.R;
import com.tablepet.bean.BidBean;
import com.tablepet.databinding.ItemBidBinding;

import java.util.List;

public class BidAdapter extends ArrayAdapter<BidBean> {
    private static final int layoutId = R.layout.fragment_bid;
    private final Activity context;
    public BidAdapter(Activity context, List<BidBean> objects){
        super(context,layoutId,objects);
        this.context=context;
    }
    @SuppressLint("SetTextI18n")
    @Override
    public View getView(int position, View convertView, ViewGroup parent){
        BidBean bidBean = getItem(position);
        @SuppressLint("ViewHolder") @NonNull ItemBidBinding binding = ItemBidBinding.inflate(LayoutInflater.from(context));

        return binding.getRoot();
    }
}